From 4019faf7dff2103c9a0173193a1eb036d2d04860 Mon Sep 17 00:00:00 2001 From: robertl Date: Sun, 17 Nov 2002 02:21:29 +0000 Subject: [PATCH] Add support for Magellan Sportrak. --- magellan.h | 3 ++- magproto.c | 8 ++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/magellan.h b/magellan.h index 6d401f175..7050befbe 100644 --- a/magellan.h +++ b/magellan.h @@ -29,7 +29,8 @@ typedef enum { mm_map410, mm_map330, mm_gps310, - mm_meridian + mm_meridian, + mm_sportrak } meridian_model; typedef struct pid_to_model { diff --git a/magproto.c b/magproto.c index 9011e017d..72d4568de 100644 --- a/magproto.c +++ b/magproto.c @@ -158,6 +158,7 @@ pid_to_model_t pid_to_model[] = { mm_map330, 30, "Map 330" }, { mm_gps310, 31, "GPS 310" }, { mm_meridian, 33, "Meridian" }, + { mm_sportrak, 36, "SporTrak" }, { mm_unknown, 0, NULL } }; @@ -315,13 +316,14 @@ mag_verparse(char *ibuf) break; case mm_map330: case mm_meridian: + case mm_sportrak: icon_mapping = map330_icon_table; setshort_length(8); setshort_mustupper(0); mag_cleanse = m330_cleanse; break; default: - fatal(MYNAME ": Unknown receiver type.\n"); + fatal(MYNAME ": Unknown receiver type %d, model version '%s'.\n", prodid, version); } } @@ -947,6 +949,7 @@ mag_waypt_pr(const waypoint *waypointp) const char *icon_token=NULL; char *owpt; char *odesc; + char *isrc; ilat = waypointp->position.latitude.degrees; ilon = waypointp->position.longitude.degrees; @@ -972,8 +975,9 @@ mag_waypt_pr(const waypoint *waypointp) break; } + isrc = waypointp->notes ? waypointp->notes : waypointp->description; owpt = global_opts.synthesize_shortnames ? - mkshort(waypointp->description) : waypointp->shortname, + mkshort(isrc) : waypointp->shortname, odesc = waypointp->description ? waypointp->description : ""; owpt = mag_cleanse(owpt); odesc = mag_cleanse(odesc); -- 2.30.2